home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 22 / AACD 22.iso / AACD / Online / Apache / include / php / Zend / zend_globals_macros.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-07-02  |  3.1 KB  |  90 lines

  1. /*
  2.    +----------------------------------------------------------------------+
  3.    | Zend Engine                                                          |
  4.    +----------------------------------------------------------------------+
  5.    | Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
  6.    +----------------------------------------------------------------------+
  7.    | This source file is subject to version 0.92 of the Zend license,     |
  8.    | that is bundled with this package in the file LICENSE, and is        | 
  9.    | available at through the world-wide-web at                           |
  10.    | http://www.zend.com/license/0_92.txt.                                |
  11.    | If you did not receive a copy of the Zend license and are unable to  |
  12.    | obtain it through the world-wide-web, please send a note to          |
  13.    | license@zend.com so we can mail you a copy immediately.              |
  14.    +----------------------------------------------------------------------+
  15.    | Authors: Andi Gutmans <andi@zend.com>                                |
  16.    |          Zeev Suraski <zeev@zend.com>                                |
  17.    +----------------------------------------------------------------------+
  18. */
  19.  
  20.  
  21. #ifndef ZEND_GLOBALS_MACROS_H
  22. #define ZEND_GLOBALS_MACROS_H
  23.  
  24. typedef struct _zend_compiler_globals zend_compiler_globals;
  25. typedef struct _zend_executor_globals zend_executor_globals;
  26. typedef struct _zend_alloc_globals zend_alloc_globals;
  27.  
  28. /* Compiler */
  29. #ifdef ZTS
  30. # define CLS_D    zend_compiler_globals *compiler_globals
  31. # define CLS_DC    , CLS_D
  32. # define CLS_C    compiler_globals
  33. # define CLS_CC , CLS_C
  34. # define CG(v) (((zend_compiler_globals *) compiler_globals)->v)
  35. # define CLS_FETCH()    zend_compiler_globals *compiler_globals = (zend_compiler_globals *) ts_resource(compiler_globals_id)
  36. BEGIN_EXTERN_C()
  37. int zendparse(void *compiler_globals);
  38. END_EXTERN_C()
  39. #else
  40. # define CLS_D    void
  41. # define CLS_DC
  42. # define CLS_C
  43. # define CLS_CC
  44. # define CG(v) (compiler_globals.v)
  45. # define CLS_FETCH()
  46. extern ZEND_API struct _zend_compiler_globals compiler_globals;
  47. int zendparse(void);
  48. #endif
  49.  
  50.  
  51. /* Executor */
  52. #ifdef ZTS
  53. # define ELS_D    zend_executor_globals *executor_globals
  54. # define ELS_DC    , ELS_D
  55. # define ELS_C    executor_globals
  56. # define ELS_CC , ELS_C
  57. # define EG(v) (executor_globals->v)
  58. # define ELS_FETCH()    zend_executor_globals *executor_globals = (zend_executor_globals *) ts_resource(executor_globals_id)
  59. #else
  60. # define ELS_D    void
  61. # define ELS_DC
  62. # define ELS_C
  63. # define ELS_CC
  64. # define EG(v) (executor_globals.v)
  65. # define ELS_FETCH()
  66. extern ZEND_API zend_executor_globals executor_globals;
  67. #endif
  68.  
  69.  
  70. /* Memory Manager */
  71. #ifdef ZTS
  72. # define ALS_D    zend_alloc_globals *alloc_globals
  73. # define ALS_DC    , ALS_D
  74. # define ALS_C    alloc_globals
  75. # define ALS_CC , ALS_C
  76. # define AG(v) (((zend_alloc_globals *) alloc_globals)->v)
  77. # define ALS_FETCH()    zend_alloc_globals *alloc_globals = (zend_alloc_globals *) ts_resource(alloc_globals_id)
  78. #else
  79. # define ALS_D    void
  80. # define ALS_DC
  81. # define ALS_C
  82. # define ALS_CC
  83. # define AG(v) (alloc_globals.v)
  84. # define ALS_FETCH()
  85. extern ZEND_API zend_alloc_globals alloc_globals;
  86. #endif
  87.  
  88. #endif /* ZEND_GLOBALS_MACROS_H */
  89.  
  90.